\hypertarget{class_event_manager}{\section{Event\+Manager类 参考}
\label{class_event_manager}\index{Event\+Manager@{Event\+Manager}}
}


Observer模式实现的事件管理器.  




{\ttfamily \#include $<$Event.\+h$>$}

类 Event\+Manager 继承关系图\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{class_event_manager}
\end{center}
\end{figure}
\subsection*{Public 成员函数}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_event_manager_a89099b22114f158b5c530edfea52371d}{Event\+Manager} ()
\begin{DoxyCompactList}\small\item\em Event\+Manager构造函数 \end{DoxyCompactList}\item 
\hyperlink{class_event_manager_a2e43e8b165b54f75e9c005cf5b04ade7}{$\sim$\+Event\+Manager} ()
\begin{DoxyCompactList}\small\item\em Event\+Manager析构函数 \end{DoxyCompactList}\item 
void \hyperlink{class_event_manager_a355cb858f96db9e24b4a74ea6c85ba88}{register\+Handler} (\hyperlink{class_event_handler}{Event\+Handler} $\ast$p\+Evt\+Handler)
\begin{DoxyCompactList}\small\item\em 注册事件处理者 \end{DoxyCompactList}\item 
void \hyperlink{class_event_manager_ac6428e8394e4f1ba156654af352448f3}{unregister\+Handler} (\hyperlink{class_event_handler}{Event\+Handler} $\ast$p\+Evt\+Handler)
\begin{DoxyCompactList}\small\item\em 取消注册事件处理者到事件中心 \end{DoxyCompactList}\item 
void \hyperlink{class_event_manager_a39905fd1ae46b83981aa369d1c834ecf}{post\+Event} (\hyperlink{class_event}{Event} \&evt)
\begin{DoxyCompactList}\small\item\em 发送事件 \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{静态 Public 成员函数}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{class_event_manager}{Event\+Manager} $\ast$ \hyperlink{class_event_manager_aef79fefe8afd354f1fa02e7bd4e87052}{get\+Instance} ()
\begin{DoxyCompactList}\small\item\em 获取\+Event\+Manager单例 \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{详细描述}
Observer模式实现的事件管理器. 

\subsection{构造及析构函数说明}
\hypertarget{class_event_manager_a89099b22114f158b5c530edfea52371d}{\index{Event\+Manager@{Event\+Manager}!Event\+Manager@{Event\+Manager}}
\index{Event\+Manager@{Event\+Manager}!Event\+Manager@{Event\+Manager}}
\subsubsection[{Event\+Manager}]{\setlength{\rightskip}{0pt plus 5cm}Event\+Manager\+::\+Event\+Manager (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_event_manager_a89099b22114f158b5c530edfea52371d}


Event\+Manager构造函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
要使用事件必须要有\+Event\+Center,构造对象是启动事件中心线程 
\end{DoxyNote}
\hypertarget{class_event_manager_a2e43e8b165b54f75e9c005cf5b04ade7}{\index{Event\+Manager@{Event\+Manager}!````~Event\+Manager@{$\sim$\+Event\+Manager}}
\index{````~Event\+Manager@{$\sim$\+Event\+Manager}!Event\+Manager@{Event\+Manager}}
\subsubsection[{$\sim$\+Event\+Manager}]{\setlength{\rightskip}{0pt plus 5cm}Event\+Manager\+::$\sim$\+Event\+Manager (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_event_manager_a2e43e8b165b54f75e9c005cf5b04ade7}


Event\+Manager析构函数 


\begin{DoxyParams}{参数}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
none 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


\subsection{成员函数说明}
\hypertarget{class_event_manager_aef79fefe8afd354f1fa02e7bd4e87052}{\index{Event\+Manager@{Event\+Manager}!get\+Instance@{get\+Instance}}
\index{get\+Instance@{get\+Instance}!Event\+Manager@{Event\+Manager}}
\subsubsection[{get\+Instance}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Event\+Manager}$\ast$ Event\+Manager\+::get\+Instance (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{class_event_manager_aef79fefe8afd354f1fa02e7bd4e87052}


获取\+Event\+Manager单例 


\begin{DoxyParams}{参数}
{\em void} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
Event\+Manager$\ast$ 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_event_manager_a39905fd1ae46b83981aa369d1c834ecf}{\index{Event\+Manager@{Event\+Manager}!post\+Event@{post\+Event}}
\index{post\+Event@{post\+Event}!Event\+Manager@{Event\+Manager}}
\subsubsection[{post\+Event}]{\setlength{\rightskip}{0pt plus 5cm}void Event\+Manager\+::post\+Event (
\begin{DoxyParamCaption}
\item[{{\bf Event} \&}]{evt}
\end{DoxyParamCaption}
)}}\label{class_event_manager_a39905fd1ae46b83981aa369d1c834ecf}


发送事件 


\begin{DoxyParams}{参数}
{\em evt} & 事件 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
void 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}
\hypertarget{class_event_manager_a355cb858f96db9e24b4a74ea6c85ba88}{\index{Event\+Manager@{Event\+Manager}!register\+Handler@{register\+Handler}}
\index{register\+Handler@{register\+Handler}!Event\+Manager@{Event\+Manager}}
\subsubsection[{register\+Handler}]{\setlength{\rightskip}{0pt plus 5cm}void Event\+Manager\+::register\+Handler (
\begin{DoxyParamCaption}
\item[{{\bf Event\+Handler} $\ast$}]{p\+Evt\+Handler}
\end{DoxyParamCaption}
)}}\label{class_event_manager_a355cb858f96db9e24b4a74ea6c85ba88}


注册事件处理者 


\begin{DoxyParams}{参数}
{\em p\+Evt\+Handler} & 事件处理者 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
void 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
注册后,事件处理者需要实现handle\+Event来处理事件 
\end{DoxyNote}
\hypertarget{class_event_manager_ac6428e8394e4f1ba156654af352448f3}{\index{Event\+Manager@{Event\+Manager}!unregister\+Handler@{unregister\+Handler}}
\index{unregister\+Handler@{unregister\+Handler}!Event\+Manager@{Event\+Manager}}
\subsubsection[{unregister\+Handler}]{\setlength{\rightskip}{0pt plus 5cm}void Event\+Manager\+::unregister\+Handler (
\begin{DoxyParamCaption}
\item[{{\bf Event\+Handler} $\ast$}]{p\+Evt\+Handler}
\end{DoxyParamCaption}
)}}\label{class_event_manager_ac6428e8394e4f1ba156654af352448f3}


取消注册事件处理者到事件中心 


\begin{DoxyParams}{参数}
{\em p\+Evt\+Handler} & 事件处理者 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{返回}
void 
\end{DoxyReturn}
\begin{DoxyNote}{注解}
none 
\end{DoxyNote}


该类的文档由以下文件生成\+:\begin{DoxyCompactItemize}
\item 
libemb/inc/\hyperlink{_event_8h}{Event.\+h}\item 
libemb/src/Event.\+cpp\end{DoxyCompactItemize}
